/* GUI CONVERTED from rcslmt.p (converter v1.75) Sat Aug 12 23:02:51 2000 */
/* rcslmt.p - Release Management Customer Schedules                     */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                 */
/* REVISION: 7.3    LAST MODIFIED: 12/21/92           BY: WUG *G462*    */
/* REVISION: 7.3    LAST MODIFIED: 12/15/94           BY: rxm *GN16*    */
/* REVISION: 7.3    LAST MODIFIED: 03/29/95           BY: bcm *G0JS*    */
/* REVISION: 7.3    LAST MODIFIED: 04/10/95           BY: yep *G0KL*    */
/* REVISION: 7.3    LAST MODIFIED: 02/21/96           BY: kjm *G1NQ*    */


/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan   */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan   */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb              */
     /* DISPLAY TITLE */
     {mfdtitle.i "b+ "}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE rcslmt_p_1 " Barcode Data Prefixes "
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_2 "Mixed Load Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_3 " Template Files "
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_4 "Mixed Load Serial"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_5 " Special Text Fields "
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_6 "Master Pack Serial"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_7 "Master Pack Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_8 "Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_9 "Customer/Ship-To"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_10 "Customer PO"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_11 "Customer Item"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_12 "Shipper ID"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_13 "Single Pack Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_14 "Single Pack Serial"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_15 "Quantity"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_16 "Supplier ID"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_17 "Special 3 Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_18 "Special 3"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_19 "Special 4 Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_20 "Special 4"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_21 "Special 1 Label"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_22 "Special 1"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_23 "Special 2"
/* MaxLen: Comment: */

&SCOPED-DEFINE rcslmt_p_24 "Special 2 Label"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

     /* CUSTOMER SHIPPING LABEL SETUP */

     define variable shipto like ad_addr.

     define variable ad_shipid_pfx as character format "x(2)"
        label {&rcslmt_p_12}.
     define variable ad_mixed_pfx as character format "x(2)"
        label {&rcslmt_p_4}.
     define variable ad_master_pfx as character format "x(2)"
        label {&rcslmt_p_6}.
     define variable ad_single_pfx as character format "x(2)"
        label {&rcslmt_p_14}.
     define variable ad_custitem_pfx as character format "x(2)"
        label {&rcslmt_p_11}.
     define variable ad_qty_pfx as character format "x(2)"
        label {&rcslmt_p_15}.
     define variable ad_custpo_pfx as character format "x(2)"
        label {&rcslmt_p_10}.
     define variable ad_supplier_pfx as character format "x(2)"
        label {&rcslmt_p_16}.
     define variable ad_spcl1_pfx as character format "x(2)"
        label {&rcslmt_p_22}.
     define variable ad_spcl2_pfx as character format "x(2)"
        label {&rcslmt_p_23}.
     define variable ad_spcl3_pfx as character format "x(2)"
        label {&rcslmt_p_18}.
     define variable ad_spcl4_pfx as character format "x(2)"
        label {&rcslmt_p_20}.
     define variable ad_spcl1_desc as character format "x(24)"
        label {&rcslmt_p_8}.
     define variable ad_spcl2_desc as character format "x(24)"
        label {&rcslmt_p_8}.
     define variable ad_spcl3_desc as character format "x(24)"
        label {&rcslmt_p_8}.
     define variable ad_spcl4_desc as character format "x(24)"
        label {&rcslmt_p_8}.

     define variable ad_spcl1_text_desc as character format "x(24)"
        label {&rcslmt_p_21}.
     define variable ad_spcl2_text_desc as character format "x(24)"
        label {&rcslmt_p_24}.
     define variable ad_spcl3_text_desc as character format "x(24)"
        label {&rcslmt_p_17}.
     define variable ad_spcl4_text_desc as character format "x(24)"
        label {&rcslmt_p_19}.

     define variable ad_mixed_fn as character format "x(40)"
        label {&rcslmt_p_2}.
     define variable ad_master_fn as character format "x(40)"
        label {&rcslmt_p_7}.
     define variable ad_single_fn as character format "x(40)"
        label {&rcslmt_p_13}.

     /* DISPLAY SELECTION FORM */
     
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
        
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/

        shipto         colon 20 label {&rcslmt_p_9}
/*G1NQ*/    ad_name        no-label colon 40
/*G1NQ*/    ls_type        colon 20
/*G1NQ*     ad_type        no_label */
/*G1NQ*     ad_name        no_label */
      SKIP(.4)  /*GUI*/
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



     /* SET EXTERNAL LABELS */
     setFrameLabels(frame a:handle).

     FORM /*GUI*/ 
        
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
ad_shipid_pfx        colon 20
        ad_custitem_pfx      colon 40
        ad_mixed_pfx         colon 20
        ad_qty_pfx           colon 40
        ad_master_pfx        colon 20
        ad_custpo_pfx        colon 40
        ad_single_pfx        colon 20
        ad_supplier_pfx      colon 40             7
        skip(1)
        ad_spcl1_pfx         colon 20
        ad_spcl1_desc        colon 40
        ad_spcl2_pfx         colon 20
        ad_spcl2_desc        colon 40
        ad_spcl3_pfx         colon 20
        ad_spcl3_desc        colon 40
        ad_spcl4_pfx         colon 20
        ad_spcl4_desc        colon 40
      SKIP(.4)  /*GUI*/
with frame b side-labels width 80 attr-space
/*G0JS*/  NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-b-title AS CHARACTER.
 F-b-title = (getFrameTitle("BARCODE_DATA_PREFIXES",30)).
 RECT-FRAME-LABEL:SCREEN-VALUE in frame b = F-b-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame b =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame b + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame b =
  FRAME b:HEIGHT-PIXELS - RECT-FRAME:Y in frame b - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME b = FRAME b:WIDTH-CHARS - .5. /*GUI*/


/* SET EXTERNAL LABELS */
setFrameLabels(frame b:handle).
/*G0JS** title "Barcode Data Prefixes". **/

     FORM /*GUI*/ 
        
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
ad_mixed_fn          colon 30
        ad_master_fn         colon 30
        ad_single_fn         colon 30
      SKIP(.4)  /*GUI*/
with frame c side-labels width 80 attr-space
/*G0JS*/  NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-c-title AS CHARACTER.
 F-c-title = (getFrameTitle("TEMPLATE_FILES",21)).
 RECT-FRAME-LABEL:SCREEN-VALUE in frame c = F-c-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame c =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame c + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame c =
  FRAME c:HEIGHT-PIXELS - RECT-FRAME:Y in frame c - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME c = FRAME c:WIDTH-CHARS - .5. /*GUI*/


/* SET EXTERNAL LABELS */
setFrameLabels(frame c:handle).
/*G0JS** title "Template Files". **/

     FORM /*GUI*/ 
        
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
ad_spcl1_text_desc   colon 30
        ad_spcl2_text_desc   colon 30
        ad_spcl3_text_desc   colon 30
        ad_spcl4_text_desc   colon 30
      SKIP(.4)  /*GUI*/
with frame d side-labels width 80 attr-space
/*G0JS*/  NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-d-title AS CHARACTER.
 F-d-title = (getFrameTitle("SPECIAL_TEXT_FIELDS",28)).
 RECT-FRAME-LABEL:SCREEN-VALUE in frame d = F-d-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame d =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame d + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame d =
  FRAME d:HEIGHT-PIXELS - RECT-FRAME:Y in frame d - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME d = FRAME d:WIDTH-CHARS - .5. /*GUI*/


/* SET EXTERNAL LABELS */
setFrameLabels(frame d:handle).
/*G0JS** title "Special Text Fields". **/

     mainloop:
     repeat:
/*GUI*/ if global-beam-me-up then undo, leave.

        set shipto with frame a editing:
/*GN16         {mfnp05.i ad_mstr ad_addr
 *             "(ad_type = ""ship-to"" or ad_type = ""customer"")"
 *             ad_addr "input shipto"} */
/*GN16*/       {mfnp05.i ls_mstr ls_addrtype
           "(ls_type = ""ship-to"" or ls_type = ""customer""
           or ls_type = ""dock"")" ls_addr "input shipto"}

/*GN16         if recno <> ? then */
/*GN16*/       if recno <> ? then do:
/*GN16*/          find ad_mstr where ad_addr = ls_addr no-lock no-error.
          display
             ad_addr @ shipto
/*GN16               ad_type */
/*GN16*/             ls_type
             ad_name
          with frame a.
/*GN16*/       end.
        end.

        if shipto = "" then do:
           {mfmsg.i 40 3}
           undo mainloop.
        end.

/*GN16      find ad_mstr where ad_addr = shipto
 *          and (ad_type = "ship-to" or ad_type = "customer") */
/*GN16*/    find first ls_mstr where ls_addr = shipto
/*GN16*/    and (ls_type = "ship-to" or ls_type = "customer"
/*GN16*/    or ls_type = "dock")
        exclusive-lock no-error.

/*GN16      if not available ad_mstr then do: */
/*GN16*/    if not available ls_mstr then do:
/*G0KL*        {mfmsg.i 9001 3}  */
/*G0KL*/       {mfmsg.i 8501 3}  /* SHIP-TO DOES NOT EXIST */
           undo, retry.
        end.

/*GN16*/    find ad_mstr where ad_addr = ls_addr no-error.

        display
           ad_addr @ shipto
/*GN16         ad_type */
/*GN16*/       ls_type
           ad_name
        with frame a.

        assign
           ad_shipid_pfx        = substring(ad_barlbl_prt,1,2)
           ad_mixed_pfx         = substring(ad_barlbl_prt,3,2)
           ad_master_pfx        = substring(ad_barlbl_prt,5,2)
           ad_single_pfx        = substring(ad_barlbl_prt,7,2)
           ad_custitem_pfx      = substring(ad_barlbl_prt,9,2)
           ad_qty_pfx           = substring(ad_barlbl_prt,11,2)
           ad_custpo_pfx        = substring(ad_barlbl_prt,13,2)
           ad_supplier_pfx      = substring(ad_barlbl_prt,15,2)
           ad_spcl1_pfx         = substring(ad_barlbl_prt,17,2)
           ad_spcl2_pfx         = substring(ad_barlbl_prt,19,2)
           ad_spcl3_pfx         = substring(ad_barlbl_prt,21,2)
           ad_spcl4_pfx         = substring(ad_barlbl_prt,23,2)
           ad_spcl1_desc        = substring(ad_barlbl_prt,25,24)
           ad_spcl2_desc        = substring(ad_barlbl_prt,50,24)
           ad_spcl3_desc        = substring(ad_barlbl_prt,75,24)
           ad_spcl4_desc        = substring(ad_barlbl_prt,100,24)
           ad_mixed_fn          = substring(ad_barlbl_prt,124,40)
           ad_master_fn         = substring(ad_barlbl_prt,164,40)
           ad_single_fn         = substring(ad_barlbl_prt,204,40)
           ad_spcl1_text_desc   = substring(ad_barlbl_prt,244,24)
           ad_spcl2_text_desc   = substring(ad_barlbl_prt,268,24)
           ad_spcl3_text_desc   = substring(ad_barlbl_prt,292,24)
           ad_spcl4_text_desc   = substring(ad_barlbl_prt,316,24).

        update
           ad_shipid_pfx
           ad_mixed_pfx
           ad_master_pfx
           ad_single_pfx
           ad_custitem_pfx
           ad_qty_pfx
           ad_custpo_pfx
           ad_supplier_pfx
           ad_spcl1_pfx
           ad_spcl1_desc
           ad_spcl2_pfx
           ad_spcl2_desc
           ad_spcl3_pfx
           ad_spcl3_desc
           ad_spcl4_pfx
           ad_spcl4_desc
        with frame b.

        hide frame b no-pause.

        update
           ad_spcl1_text_desc
           ad_spcl2_text_desc
           ad_spcl3_text_desc
           ad_spcl4_text_desc
        with frame d.

        hide frame d no-pause.

        update
           ad_mixed_fn
           ad_master_fn
           ad_single_fn
        with frame c.

        hide frame c no-pause.

        assign
           substring(ad_barlbl_prt,1,2)    = string(ad_shipid_pfx,"x(2)")
           substring(ad_barlbl_prt,3,2)    = string(ad_mixed_pfx,"x(2)")
           substring(ad_barlbl_prt,5,2)    = string(ad_master_pfx,"x(2)")
           substring(ad_barlbl_prt,7,2)    = string(ad_single_pfx,"x(2)")
           substring(ad_barlbl_prt,9,2)    = string(ad_custitem_pfx,"x(2)")
           substring(ad_barlbl_prt,11,2)   = string(ad_qty_pfx,"x(2)")
           substring(ad_barlbl_prt,13,2)   = string(ad_custpo_pfx,"x(2)")
           substring(ad_barlbl_prt,15,2)   = string(ad_supplier_pfx,"x(2)")
           substring(ad_barlbl_prt,17,2)   = string(ad_spcl1_pfx,"x(2)")
           substring(ad_barlbl_prt,19,2)   = string(ad_spcl2_pfx,"x(2)")
           substring(ad_barlbl_prt,21,2)   = string(ad_spcl3_pfx,"x(2)")
           substring(ad_barlbl_prt,23,2)   = string(ad_spcl4_pfx,"x(2)")
           substring(ad_barlbl_prt,25,24)  = string(ad_spcl1_desc,"x(24)")
           substring(ad_barlbl_prt,50,24)  = string(ad_spcl2_desc,"x(24)")
           substring(ad_barlbl_prt,75,24)  = string(ad_spcl3_desc,"x(24)")
           substring(ad_barlbl_prt,100,24) = string(ad_spcl4_desc,"x(24)")
           substring(ad_barlbl_prt,124,40) = string(ad_mixed_fn,"x(40)")
           substring(ad_barlbl_prt,164,40) = string(ad_master_fn,"x(40)")
           substring(ad_barlbl_prt,204,40) = string(ad_single_fn,"x(40)")
           substring(ad_barlbl_prt,244,24) =
          string(ad_spcl1_text_desc,"x(24)")
           substring(ad_barlbl_prt,268,24) =
          string(ad_spcl2_text_desc,"x(24)")
           substring(ad_barlbl_prt,292,24) =
          string(ad_spcl3_text_desc,"x(24)")
           substring(ad_barlbl_prt,316,24) =
          string(ad_spcl4_text_desc,"x(24)").
     end.
/*GUI*/ if global-beam-me-up then undo, leave.

